Optimal. Leaf size=147 \[ -\frac {\left (3 c^2+10 c d+19 d^2\right ) \tanh ^{-1}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {2} \sqrt {a+a \sin (e+f x)}}\right )}{16 \sqrt {2} a^{5/2} f}-\frac {3 (c-d) (c+3 d) \cos (e+f x)}{16 a f (a+a \sin (e+f x))^{3/2}}-\frac {(c-d) \cos (e+f x) (c+d \sin (e+f x))}{4 f (a+a \sin (e+f x))^{5/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.16, antiderivative size = 147, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.148, Rules used = {2839, 2829,
2728, 212} \begin {gather*} -\frac {\left (3 c^2+10 c d+19 d^2\right ) \tanh ^{-1}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {2} \sqrt {a \sin (e+f x)+a}}\right )}{16 \sqrt {2} a^{5/2} f}-\frac {(c-d) \cos (e+f x) (c+d \sin (e+f x))}{4 f (a \sin (e+f x)+a)^{5/2}}-\frac {3 (c-d) (c+3 d) \cos (e+f x)}{16 a f (a \sin (e+f x)+a)^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 2728
Rule 2829
Rule 2839
Rubi steps
\begin {align*} \int \frac {(c+d \sin (e+f x))^2}{(a+a \sin (e+f x))^{5/2}} \, dx &=-\frac {(c-d) \cos (e+f x) (c+d \sin (e+f x))}{4 f (a+a \sin (e+f x))^{5/2}}-\frac {\int \frac {-\frac {1}{2} a \left (3 c^2+7 c d-2 d^2\right )-\frac {1}{2} a d (c+7 d) \sin (e+f x)}{(a+a \sin (e+f x))^{3/2}} \, dx}{4 a^2}\\ &=-\frac {3 (c-d) (c+3 d) \cos (e+f x)}{16 a f (a+a \sin (e+f x))^{3/2}}-\frac {(c-d) \cos (e+f x) (c+d \sin (e+f x))}{4 f (a+a \sin (e+f x))^{5/2}}+\frac {\left (3 c^2+10 c d+19 d^2\right ) \int \frac {1}{\sqrt {a+a \sin (e+f x)}} \, dx}{32 a^2}\\ &=-\frac {3 (c-d) (c+3 d) \cos (e+f x)}{16 a f (a+a \sin (e+f x))^{3/2}}-\frac {(c-d) \cos (e+f x) (c+d \sin (e+f x))}{4 f (a+a \sin (e+f x))^{5/2}}-\frac {\left (3 c^2+10 c d+19 d^2\right ) \text {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,\frac {a \cos (e+f x)}{\sqrt {a+a \sin (e+f x)}}\right )}{16 a^2 f}\\ &=-\frac {\left (3 c^2+10 c d+19 d^2\right ) \tanh ^{-1}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {2} \sqrt {a+a \sin (e+f x)}}\right )}{16 \sqrt {2} a^{5/2} f}-\frac {3 (c-d) (c+3 d) \cos (e+f x)}{16 a f (a+a \sin (e+f x))^{3/2}}-\frac {(c-d) \cos (e+f x) (c+d \sin (e+f x))}{4 f (a+a \sin (e+f x))^{5/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 0.35, size = 252, normalized size = 1.71 \begin {gather*} \frac {\left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right ) \left (8 (c-d)^2 \sin \left (\frac {1}{2} (e+f x)\right )-4 (c-d)^2 \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )+2 \left (3 c^2+10 c d-13 d^2\right ) \sin \left (\frac {1}{2} (e+f x)\right ) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^2-(c-d) (3 c+13 d) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^3+(1+i) (-1)^{3/4} \left (3 c^2+10 c d+19 d^2\right ) \tanh ^{-1}\left (\left (\frac {1}{2}+\frac {i}{2}\right ) (-1)^{3/4} \left (-1+\tan \left (\frac {1}{4} (e+f x)\right )\right )\right ) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^4\right )}{16 f (a (1+\sin (e+f x)))^{5/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(377\) vs.
\(2(128)=256\).
time = 4.72, size = 378, normalized size = 2.57
method | result | size |
default | \(\frac {\left (-2 \sin \left (f x +e \right ) \arctanh \left (\frac {\sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {a}}\right ) \sqrt {2}\, a^{2} \left (3 c^{2}+10 c d +19 d^{2}\right )+\arctanh \left (\frac {\sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {a}}\right ) \sqrt {2}\, a^{2} \left (3 c^{2}+10 c d +19 d^{2}\right ) \left (\cos ^{2}\left (f x +e \right )\right )-6 \sqrt {2}\, \arctanh \left (\frac {\sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {a}}\right ) a^{2} c^{2}-20 \sqrt {2}\, \arctanh \left (\frac {\sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {a}}\right ) a^{2} c d -38 \sqrt {2}\, \arctanh \left (\frac {\sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {a}}\right ) a^{2} d^{2}-20 \sqrt {a -a \sin \left (f x +e \right )}\, a^{\frac {3}{2}} c^{2}-24 \sqrt {a -a \sin \left (f x +e \right )}\, a^{\frac {3}{2}} c d +44 \sqrt {a -a \sin \left (f x +e \right )}\, a^{\frac {3}{2}} d^{2}+6 \left (a -a \sin \left (f x +e \right )\right )^{\frac {3}{2}} \sqrt {a}\, c^{2}+20 \left (a -a \sin \left (f x +e \right )\right )^{\frac {3}{2}} \sqrt {a}\, c d -26 \left (a -a \sin \left (f x +e \right )\right )^{\frac {3}{2}} \sqrt {a}\, d^{2}\right ) \sqrt {-a \left (\sin \left (f x +e \right )-1\right )}}{32 a^{\frac {9}{2}} \left (1+\sin \left (f x +e \right )\right ) \cos \left (f x +e \right ) \sqrt {a +a \sin \left (f x +e \right )}\, f}\) | \(378\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 520 vs.
\(2 (135) = 270\).
time = 0.35, size = 520, normalized size = 3.54 \begin {gather*} \frac {\sqrt {2} {\left ({\left (3 \, c^{2} + 10 \, c d + 19 \, d^{2}\right )} \cos \left (f x + e\right )^{3} + 3 \, {\left (3 \, c^{2} + 10 \, c d + 19 \, d^{2}\right )} \cos \left (f x + e\right )^{2} - 12 \, c^{2} - 40 \, c d - 76 \, d^{2} - 2 \, {\left (3 \, c^{2} + 10 \, c d + 19 \, d^{2}\right )} \cos \left (f x + e\right ) + {\left ({\left (3 \, c^{2} + 10 \, c d + 19 \, d^{2}\right )} \cos \left (f x + e\right )^{2} - 12 \, c^{2} - 40 \, c d - 76 \, d^{2} - 2 \, {\left (3 \, c^{2} + 10 \, c d + 19 \, d^{2}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )\right )} \sqrt {a} \log \left (-\frac {a \cos \left (f x + e\right )^{2} - 2 \, \sqrt {2} \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {a} {\left (\cos \left (f x + e\right ) - \sin \left (f x + e\right ) + 1\right )} + 3 \, a \cos \left (f x + e\right ) - {\left (a \cos \left (f x + e\right ) - 2 \, a\right )} \sin \left (f x + e\right ) + 2 \, a}{\cos \left (f x + e\right )^{2} - {\left (\cos \left (f x + e\right ) + 2\right )} \sin \left (f x + e\right ) - \cos \left (f x + e\right ) - 2}\right ) + 4 \, {\left ({\left (3 \, c^{2} + 10 \, c d - 13 \, d^{2}\right )} \cos \left (f x + e\right )^{2} + 4 \, c^{2} - 8 \, c d + 4 \, d^{2} + {\left (7 \, c^{2} + 2 \, c d - 9 \, d^{2}\right )} \cos \left (f x + e\right ) - {\left (4 \, c^{2} - 8 \, c d + 4 \, d^{2} - {\left (3 \, c^{2} + 10 \, c d - 13 \, d^{2}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )\right )} \sqrt {a \sin \left (f x + e\right ) + a}}{64 \, {\left (a^{3} f \cos \left (f x + e\right )^{3} + 3 \, a^{3} f \cos \left (f x + e\right )^{2} - 2 \, a^{3} f \cos \left (f x + e\right ) - 4 \, a^{3} f + {\left (a^{3} f \cos \left (f x + e\right )^{2} - 2 \, a^{3} f \cos \left (f x + e\right ) - 4 \, a^{3} f\right )} \sin \left (f x + e\right )\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (c + d \sin {\left (e + f x \right )}\right )^{2}}{\left (a \left (\sin {\left (e + f x \right )} + 1\right )\right )^{\frac {5}{2}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 309 vs.
\(2 (135) = 270\).
time = 0.53, size = 309, normalized size = 2.10 \begin {gather*} \frac {\frac {\sqrt {2} {\left (3 \, \sqrt {a} c^{2} + 10 \, \sqrt {a} c d + 19 \, \sqrt {a} d^{2}\right )} \log \left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}{a^{3} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )} - \frac {\sqrt {2} {\left (3 \, \sqrt {a} c^{2} + 10 \, \sqrt {a} c d + 19 \, \sqrt {a} d^{2}\right )} \log \left (-\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}{a^{3} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )} - \frac {2 \, \sqrt {2} {\left (3 \, \sqrt {a} c^{2} \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 10 \, \sqrt {a} c d \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 13 \, \sqrt {a} d^{2} \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 5 \, \sqrt {a} c^{2} \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 6 \, \sqrt {a} c d \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 11 \, \sqrt {a} d^{2} \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}}{{\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 1\right )}^{2} a^{3} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}}{64 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (c+d\,\sin \left (e+f\,x\right )\right )}^2}{{\left (a+a\,\sin \left (e+f\,x\right )\right )}^{5/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________